home *** CD-ROM | disk | FTP | other *** search
/ Developer Source 4 / developer source - volume 4.iso / exepc / jul95 / stim1f3.gif < prev   
Graphics Interchange Format  |  1996-06-19  |  57KB  |  447x510  |  4-bit (16 colors)
Labels: text | screenshot | font | number | document
OCR: GFA-BASIC exedemil File Edit Block Direct Fonts Help ================= ==== Example DLL Code for GFA-BASIC Windows Compiler By R W Stimpson 08.05.95 for .EXE Magazine compiler directives for DLL follow: name library $library EXEDEMLL create a link library and target directory $LNK EXE C:\GFAWIN\DEMO\EXEDDEMLL . DLL add description (used if DLL is loaded by PROGMAN) SDESCR "UB DEMO DLLFOR .EXE (c) 1995 R W Stimpson " declare start of a procedure (equiv, to Sub or Function in VB - this is internal GFA name) PROCEDURE GetCurrentDrive() ' specify the exported name and DLL ordinal number Sexport EXEDenCurDrive, 1 turn error trapping on TRY call DOS int 21 Fn 19h Get Current Drive "(INTR ( &H21, AX = &H1900) ) " get lower byte of _AX reg IDriveID& = BYTE(_AX) " return 2-byte integer value (& in GFA) to caller RETVAL IDriveIDG .turn off error trapping (or go here on error) CATCH " return error value RETUAL -1 RETURN Insert Run Variable Config debuG res Compile 0 C:\GFAWIN DEMO EXEDEMLL.GFW 18:57:02 1 Figure 3 - GFA Basic development environment. GFA Basic code to create a simple DLL and VB caller declaration